package com.yunji.coupon.consumer;

import com.yunji.base.domain.BelongDO;
import com.yunji.base.provide.BaseDataBelongProvide;
import com.yunji.cabinet.domain.ContainerDO;
import com.yunji.cabinet.provide.CabinetProvide;
import com.yunji.order.domain.OrderDO;
import com.yunji.order.provide.OrderProvide;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * @author : peter-zhu
 * @date : 2024/10/21 10:37
 * @description : TODO
 **/
@Component
public class CouponConsumer {

    @Resource
    private CabinetProvide cabinetProvide;

    @Resource
    private BaseDataBelongProvide belongProvide;

    @Resource
    private OrderProvide orderProvide;

    public OrderDO getByOrderId(Long orderId) {
        return orderProvide.getByOrderId(orderId);
    }

    public Map<Long, BelongDO> getBelongMap(List<Long> belongIds) {
        return belongProvide.getBelongMap(belongIds);
    }

    public ContainerDO getCabinetByQrcode(String qrCode) {
        return cabinetProvide.getCabinetByQrcode(qrCode);
    }
}
